package com.youth.service.vo;

import com.youth.entity.PageBean;
import com.youth.entity.vo.CommodityVO;
import com.youth.result.ResultBean;
import org.jboss.logging.Param;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

public interface ICommodityVOService {
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    ResultBean add(CommodityVO commodityVO);

    @RequestMapping(value = "/addByExcel", method = RequestMethod.POST)
    ResultBean addByExcel(MultipartFile excel);

    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    ResultBean delete(String code);

    @RequestMapping(value = "/edit", method = RequestMethod.POST)
    ResultBean edit(CommodityVO commodityVO);

    @RequestMapping(value = "/decreaseStockNumber", method = RequestMethod.POST)
    ResultBean decreaseStockNumber(@RequestParam("code") String code, @RequestParam("soldNumber") Integer soldNumber);

    @RequestMapping(value = "/findByCode", method = RequestMethod.GET)
    ResultBean findByCode(String code);

    /**
     * @MethodName: findAllWithConditions
     * @Description: TODO 商品条件查询
     * @Param: * @param status
     * @Return: {@link ResultBean}
     * @Author: yjwu
     * @Date: 2019/12/5 20:47
     **/
    @RequestMapping(value = "/findWithConditions", method = RequestMethod.GET)
    ResultBean findWithConditions(PageBean pageBean);
}
